#! /usr/bin/python

import re

text = "10/15/\"99"

m = re.match("(\d{2})/([0-9]{2})/\"(\d{2,4})", text)
if m:
    print m.group(1,2,3)

n = re.search("(\d{2})/(\d{2})/\"(\d{2,4})", text)
if n:
    print n.group(1)
    print n.start(), n.end()
    for i in range(n.start(), n.end()):
        print text[i]
    print n.span()

for m in re.compile("\B[ab]").finditer("tatbxaxb"):
    print m.span()
